﻿using System;
using System.Linq;
using System.Windows.Forms;
using log4net.Config;

namespace Kaleida.ServiceMonitor.UI
{
    internal class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        private static void Main(string[] args)
        {
            XmlConfigurator.Configure();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            var initialScriptNameOrPath = (args.Length == 1) ? args.Single() : null;

            var mainForm = new MainForm(initialScriptNameOrPath);
            Application.Run(mainForm);
        }

    }
}
